package com.wangtao.netty.dubborpc.consumer;

import com.wangtao.netty.dubborpc.api.HelloServer;
import com.wangtao.netty.dubborpc.netty.NettyClient;

public class ClientBootstrap {

    public static final String StringproviderName="HelloService#hello#";

    public static void main(String[] args) throws InterruptedException {
        NettyClient client = new NettyClient();
        //创建代理对象
        HelloServer server = (HelloServer) client.getBean(HelloServer.class, StringproviderName);

        for (;;) {
            Thread.sleep(10*1000);
            String res = server.sayHello("小明");
            System.out.println("调用的结果res=" + res);
        }
    }

}
